<template>
  <br>
  <h3 style="color: red"><strong>{{title}}</strong></h3> <br>
    <p v-for="(name,index) in names" :key="index">{{name}} </p>
    <br>
    <p v-for="(user,index) in list" :key="user.id">{{user.name}} </p>
</template>

<script>
export default {
  name: "KeyDemo",
  data(){
    return{
      title:"10.通过key管理状态",
      names:["李星帅","熊玲玲","李佳煜"],
      list:[
        {"id":"1","name":"李星帅","age":29},
        {"id":"2","name":"熊玲玲","age":29},
        {"id":"3","name":"李佳煜","age":1}
      ]
    }
  }
}
</script>

<style scoped>

</style>